import axios, { AxiosInstance } from "axios";

const baseURL = process.env.VUE_APP_API_URL || '/web/api';
const http: AxiosInstance = axios.create({
    baseURL
})

http.interceptors.request.use(config => {
    const visitor_id: string | null = localStorage.getItem('visitor_id');
    visitor_id && (config.headers.visitor_id = visitor_id)
    return config;
}, err => {
    return Promise.reject(err);
})















export default http;